package org.neuedu.service;

import org.neuedu.bean.reply;
import org.neuedu.dao.ReplyDao;
import org.neuedu.dao.ReplyDaoImpl;

public class ReplyServiceImpl implements ReplyService {
    private ReplyDao replyDao = new ReplyDaoImpl();
    @Override
    public int reply(reply reply) {
        int i = replyDao.saveReplyInfo(reply);
        if(i != 0){
            int c = replyDao.updateReplyNum(reply);
            if(c != 0){
                return 1;
            }
        }
        return 0;
    }

    @Override
    public int deletecontentById(Integer id) {
        replyDao.deletecontentById(id);
        return 1;
    }
}
